import request from "@/utils/api/request.js";


export const GetEnterprise = (eno) => {
    return request({
        url: `/enterprise/get/${eno}`,
        method: 'get',
    })
}

export const AnnounceJob = (eno, jobInfo) => {
    return request({
        url: '/enterprise/announce',
        method: 'post',
        data: {
            'eno': eno,
            'jobInfo': jobInfo
        }
    })
}

export const SelectAnnounced = (eno) => {
    return request({
        url: `/enterprise/select/${eno}`,
        method: 'get',
    })
}

export const SelectResume = (name, major, eno) => {
    return request({
        url: '/enterprise/resume',
        method: 'get',
        params: {
            'name': name,
            'major': major,
            'eno': eno,
        }
    })
}

export const StopAnnounce = (jobId)=>{
    return request({
        url: '/enterprise/stop',
        method: 'delete',
        params: {
            'id': jobId,
        }
    })
}

export const ListMsg = (eno, jobId)=>{
    return request({
        url: 'enterprise/listMsg',
        method:'get',
        params:{
            'eno': eno,
            'jobId': jobId,
        }
    })
}

export const Respond = (id, respond)=>{
    return request({
        url: 'enterprise/respond',
        method: 'post',
        data:{
            'id': id,
            'respond': respond,
        }
    })
}